package com.dddd.blog.blogsp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 喵星球的大橘
 */
@Data
@TableName("pms_post")
public class Blog implements Serializable {

    private static final long serialVersionUID = 6734963725801899631L;

    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    private String uuid;
    private String author;
    private String title;
    private String content;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm")
    private Date createTime;
    private int readCount;
    private int commentCount;

    private String tags;
    private String link;

}
